package route

import (
	"homePageTemplate/controller"
	"homePageTemplate/variable"
)

type HomePageTemplateRoute struct {
	HomePageTemplateController *controller.HomePageTemplateController
}

func NewHomePageTemplateRoute() *HomePageTemplateRoute {
	return &HomePageTemplateRoute{
		HomePageTemplateController: controller.NewHomePageTemplateController(),
	}
}

//func init() {
//	nhptc := controller.NewHomePageTemplateController()
//	variable.Server.POST("/editHomePageDetails", nhptc.EditHomePageDetails)
//	variable.Server.POST("/queryHomePageDetails", nhptc.QueryHomePageDetails)
//}

func (hptr *HomePageTemplateRoute)RouteInit() {
	variable.Server.POST("/editHomePageDetails", hptr.HomePageTemplateController.EditHomePageDetails)
	variable.Server.POST("/editHomePageDetailsAsync", hptr.HomePageTemplateController.EditHomePageDetailsAsync)
	variable.Server.POST("/queryHomePageDetails", hptr.HomePageTemplateController.QueryHomePageDetails)
	variable.Server.POST("/queryHomePageDetailsAsync", hptr.HomePageTemplateController.QueryHomePageDetailsAsync)
	variable.Server.GET("/queryPageAll", hptr.HomePageTemplateController.QueryPageAll)
}
